home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-11-21 | 474 b | 21 lines | [TEXT/MPS ] |
- # Rename a file only if it is different from a previously existing file of the same
- # name. This is useful for keeping make from doing too much work if the contents
- # of a file haven't changed.
- #
- # Copyright © Apple Computer, Inc. 1989, 1990
-
- set echo 0 # Build turns echo on, grumble
- set exit 0
-
- if "`exists -f {2}`"
- compare {1} {2} >dev:null
- if {status} != 0
- rename -y {1} {2}
- else
- echo {2} is unchanged
- delete -i -y {1}
- end
- else
- rename -y {1} {2}
- end
-